Optimal. Leaf size=165 \[ \frac {11 \text {ArcTan}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{8 a^3 \sqrt {d} f}+\frac {\text {ArcTan}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{2 \sqrt {2} a^3 \sqrt {d} f}+\frac {7 \sqrt {d \tan (e+f x)}}{8 a^3 d f (1+\tan (e+f x))}+\frac {\sqrt {d \tan (e+f x)}}{4 a d f (a+a \tan (e+f x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.37, antiderivative size = 165, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {3650, 3730,
3734, 3613, 211, 3715, 65} \begin {gather*} \frac {11 \text {ArcTan}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{8 a^3 \sqrt {d} f}+\frac {\text {ArcTan}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{2 \sqrt {2} a^3 \sqrt {d} f}+\frac {7 \sqrt {d \tan (e+f x)}}{8 a^3 d f (\tan (e+f x)+1)}+\frac {\sqrt {d \tan (e+f x)}}{4 a d f (a \tan (e+f x)+a)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 211
Rule 3613
Rule 3650
Rule 3715
Rule 3730
Rule 3734
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {d \tan (e+f x)} (a+a \tan (e+f x))^3} \, dx &=\frac {\sqrt {d \tan (e+f x)}}{4 a d f (a+a \tan (e+f x))^2}+\frac {\int \frac {\frac {7 a^2 d}{2}-2 a^2 d \tan (e+f x)+\frac {3}{2} a^2 d \tan ^2(e+f x)}{\sqrt {d \tan (e+f x)} (a+a \tan (e+f x))^2} \, dx}{4 a^3 d}\\ &=\frac {7 \sqrt {d \tan (e+f x)}}{8 a^3 d f (1+\tan (e+f x))}+\frac {\sqrt {d \tan (e+f x)}}{4 a d f (a+a \tan (e+f x))^2}+\frac {\int \frac {\frac {7 a^4 d^2}{2}-4 a^4 d^2 \tan (e+f x)+\frac {7}{2} a^4 d^2 \tan ^2(e+f x)}{\sqrt {d \tan (e+f x)} (a+a \tan (e+f x))} \, dx}{8 a^6 d^2}\\ &=\frac {7 \sqrt {d \tan (e+f x)}}{8 a^3 d f (1+\tan (e+f x))}+\frac {\sqrt {d \tan (e+f x)}}{4 a d f (a+a \tan (e+f x))^2}+\frac {11 \int \frac {1+\tan ^2(e+f x)}{\sqrt {d \tan (e+f x)} (a+a \tan (e+f x))} \, dx}{16 a^2}+\frac {\int \frac {-4 a^5 d^2-4 a^5 d^2 \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx}{16 a^8 d^2}\\ &=\frac {7 \sqrt {d \tan (e+f x)}}{8 a^3 d f (1+\tan (e+f x))}+\frac {\sqrt {d \tan (e+f x)}}{4 a d f (a+a \tan (e+f x))^2}+\frac {11 \text {Subst}\left (\int \frac {1}{\sqrt {d x} (a+a x)} \, dx,x,\tan (e+f x)\right )}{16 a^2 f}-\frac {\left (2 a^2 d^2\right ) \text {Subst}\left (\int \frac {1}{32 a^{10} d^4+d x^2} \, dx,x,\frac {-4 a^5 d^2+4 a^5 d^2 \tan (e+f x)}{\sqrt {d \tan (e+f x)}}\right )}{f}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{2 \sqrt {2} a^3 \sqrt {d} f}+\frac {7 \sqrt {d \tan (e+f x)}}{8 a^3 d f (1+\tan (e+f x))}+\frac {\sqrt {d \tan (e+f x)}}{4 a d f (a+a \tan (e+f x))^2}+\frac {11 \text {Subst}\left (\int \frac {1}{a+\frac {a x^2}{d}} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{8 a^2 d f}\\ &=\frac {11 \tan ^{-1}\left (\frac {\sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{8 a^3 \sqrt {d} f}+\frac {\tan ^{-1}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{2 \sqrt {2} a^3 \sqrt {d} f}+\frac {7 \sqrt {d \tan (e+f x)}}{8 a^3 d f (1+\tan (e+f x))}+\frac {\sqrt {d \tan (e+f x)}}{4 a d f (a+a \tan (e+f x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.08, size = 217, normalized size = 1.32 \begin {gather*} \frac {\left (22 \text {ArcTan}\left (\sqrt {\tan (e+f x)}\right )+4 \sqrt {2} \text {ArcTan}\left (1-\sqrt {2} \sqrt {\tan (e+f x)}\right ) (\cos (e+f x)+\sin (e+f x))^2-4 \sqrt {2} \text {ArcTan}\left (1+\sqrt {2} \sqrt {\tan (e+f x)}\right ) (\cos (e+f x)+\sin (e+f x))^2+22 \text {ArcTan}\left (\sqrt {\tan (e+f x)}\right ) \sin (2 (e+f x))+9 \sqrt {\tan (e+f x)}+9 \cos (2 (e+f x)) \sqrt {\tan (e+f x)}+7 \sin (2 (e+f x)) \sqrt {\tan (e+f x)}\right ) \sqrt {\tan (e+f x)}}{16 a^3 f (\cos (e+f x)+\sin (e+f x))^2 \sqrt {d \tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(348\) vs.
\(2(136)=272\).
time = 0.24, size = 349, normalized size = 2.12
method | result | size |
derivativedivides | \(\frac {2 d^{4} \left (\frac {\frac {\frac {7 \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{4}+\frac {9 d \sqrt {d \tan \left (f x +e \right )}}{4}}{\left (d \tan \left (f x +e \right )+d \right )^{2}}+\frac {11 \arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {d}}\right )}{4 \sqrt {d}}}{4 d^{4}}+\frac {-\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}}{4 d^{4}}\right )}{f \,a^{3}}\) | \(349\) |
default | \(\frac {2 d^{4} \left (\frac {\frac {\frac {7 \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{4}+\frac {9 d \sqrt {d \tan \left (f x +e \right )}}{4}}{\left (d \tan \left (f x +e \right )+d \right )^{2}}+\frac {11 \arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {d}}\right )}{4 \sqrt {d}}}{4 d^{4}}+\frac {-\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}}{4 d^{4}}\right )}{f \,a^{3}}\) | \(349\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 187, normalized size = 1.13 \begin {gather*} \frac {\frac {7 \, \left (d \tan \left (f x + e\right )\right )^{\frac {3}{2}} d + 9 \, \sqrt {d \tan \left (f x + e\right )} d^{2}}{a^{3} d^{2} \tan \left (f x + e\right )^{2} + 2 \, a^{3} d^{2} \tan \left (f x + e\right ) + a^{3} d^{2}} - \frac {2 \, d {\left (\frac {\sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}}\right )}}{a^{3}} + \frac {11 \, \sqrt {d} \arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right )}{a^{3}}}{8 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.93, size = 407, normalized size = 2.47 \begin {gather*} \left [-\frac {2 \, \sqrt {2} {\left (\tan \left (f x + e\right )^{2} + 2 \, \tan \left (f x + e\right ) + 1\right )} \sqrt {-d} \log \left (\frac {d \tan \left (f x + e\right )^{2} + 2 \, \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {-d} {\left (\tan \left (f x + e\right ) - 1\right )} - 4 \, d \tan \left (f x + e\right ) + d}{\tan \left (f x + e\right )^{2} + 1}\right ) + 11 \, {\left (\tan \left (f x + e\right )^{2} + 2 \, \tan \left (f x + e\right ) + 1\right )} \sqrt {-d} \log \left (\frac {d \tan \left (f x + e\right ) - 2 \, \sqrt {d \tan \left (f x + e\right )} \sqrt {-d} - d}{\tan \left (f x + e\right ) + 1}\right ) - 2 \, \sqrt {d \tan \left (f x + e\right )} {\left (7 \, \tan \left (f x + e\right ) + 9\right )}}{16 \, {\left (a^{3} d f \tan \left (f x + e\right )^{2} + 2 \, a^{3} d f \tan \left (f x + e\right ) + a^{3} d f\right )}}, -\frac {2 \, \sqrt {2} {\left (\tan \left (f x + e\right )^{2} + 2 \, \tan \left (f x + e\right ) + 1\right )} \sqrt {d} \arctan \left (\frac {\sqrt {2} \sqrt {d \tan \left (f x + e\right )} {\left (\tan \left (f x + e\right ) - 1\right )}}{2 \, \sqrt {d} \tan \left (f x + e\right )}\right ) - 11 \, {\left (\tan \left (f x + e\right )^{2} + 2 \, \tan \left (f x + e\right ) + 1\right )} \sqrt {d} \arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right ) - \sqrt {d \tan \left (f x + e\right )} {\left (7 \, \tan \left (f x + e\right ) + 9\right )}}{8 \, {\left (a^{3} d f \tan \left (f x + e\right )^{2} + 2 \, a^{3} d f \tan \left (f x + e\right ) + a^{3} d f\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {1}{\sqrt {d \tan {\left (e + f x \right )}} \tan ^{3}{\left (e + f x \right )} + 3 \sqrt {d \tan {\left (e + f x \right )}} \tan ^{2}{\left (e + f x \right )} + 3 \sqrt {d \tan {\left (e + f x \right )}} \tan {\left (e + f x \right )} + \sqrt {d \tan {\left (e + f x \right )}}}\, dx}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 318 vs.
\(2 (144) = 288\).
time = 0.75, size = 318, normalized size = 1.93 \begin {gather*} -\frac {\sqrt {2} {\left (d \sqrt {{\left | d \right |}} + {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{8 \, a^{3} d^{2} f} - \frac {\sqrt {2} {\left (d \sqrt {{\left | d \right |}} + {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{8 \, a^{3} d^{2} f} + \frac {11 \, \arctan \left (\frac {\sqrt {d \tan \left (f x + e\right )}}{\sqrt {d}}\right )}{8 \, a^{3} \sqrt {d} f} - \frac {\sqrt {2} {\left (d \sqrt {{\left | d \right |}} - {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{16 \, a^{3} d^{2} f} + \frac {\sqrt {2} {\left (d \sqrt {{\left | d \right |}} - {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{16 \, a^{3} d^{2} f} + \frac {7 \, \sqrt {d \tan \left (f x + e\right )} d \tan \left (f x + e\right ) + 9 \, \sqrt {d \tan \left (f x + e\right )} d}{8 \, {\left (d \tan \left (f x + e\right ) + d\right )}^{2} a^{3} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.78, size = 172, normalized size = 1.04 \begin {gather*} \frac {\frac {9\,d\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{8}+\frac {7\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}}{8}}{f\,a^3\,d^2\,{\mathrm {tan}\left (e+f\,x\right )}^2+2\,f\,a^3\,d^2\,\mathrm {tan}\left (e+f\,x\right )+f\,a^3\,d^2}+\frac {11\,\mathrm {atan}\left (\frac {\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )}{8\,a^3\,\sqrt {d}\,f}-\frac {\sqrt {2}\,\left (2\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{2\,\sqrt {d}}\right )+2\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{2\,\sqrt {d}}+\frac {\sqrt {2}\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}}{2\,d^{3/2}}\right )\right )}{8\,a^3\,\sqrt {d}\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________